<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>AI 世界的集合 | Data Hub</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧠</text></svg>">
  <style>
    :root{
      --bg:#ffffff;
      --card:#f6f8fa;
      --text:#111827;
      --accent:#6366F1;
      --radius:12px;
    }
    @media (prefers-color-scight: dark){
      :root{
        --bg:#0d1117;
        --card:#161b22;
        --text:#c9d1d9;
        --accent:#818cf8;
      }
    }
    [data-theme="dark"]{
      --bg:#0d1117;
      --card:#161b22;
      --text:#c9d1d9;
      --accent:#818cf8;
    }
    *{box-sizing:border-box;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;}
    body{background:var(--bg);color:var(--text);line-height:1.6;padding:2rem;}
    header{display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem;}
    h1{font-size:1.75rem;font-weight:700;}
    .toggle{background:var(--card);border:none;padding:.5rem 1rem;border-radius:var(--radius);cursor:pointer;color:var(--text);}
    .grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));}
    .card{background:var(--card);border-radius:var(--radius);padding:1.5rem;transition:transform .2s,box-shadow .2s;}
    .card:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(0,0,0,.12);}
    .card h3{margin-bottom:.5rem;font-size:1.1rem;}
    .card p{font-size:.9rem;opacity:.8;margin-bottom:1rem;}
    .card a{display:inline-flex;align-items:center;gap:.4rem;background:var(--accent);color:#fff;padding:.4rem .8rem;border-radius:6px;text-decoration:none;font-size:.85rem;}
    .card a::after{content:"📋";}
    footer{margin-top:3rem;text-align:center;font-size:.8rem;opacity:.6;}
  </style>
</head>
<body>
  <header>
    <h1>🧠 AI 世界的集合</h1>
    <button class="toggle" id="themeToggle">切换主题</button>
  </header>

  <main class="grid" id="list">
    <!-- JS 动态注入卡片 -->
  </main>

  <footer>Made with ❤️  by you. <a href="https://github.com" target="_blank">Source</a></footer>

  <script>
    // 主题切换
    const btn=document.getElementById('themeToggle');
    const html=document.documentElement;
    btn.onclick=()=>{
      html.dataset.theme = html.dataset.theme==="dark" ? "light" : "dark";
      localStorage.setItem('theme',html.dataset.theme);
    };
    if(localStorage.getItem('theme')) html.dataset.theme=localStorage.getItem('theme');

    // 数据集列表（可随意增删改）
    const datasets=[
      {name:"ImageNet",desc:"1400 万标注图像，计算机视觉基石",url:"https://www.image-net.org/"},
      {name:"Common Crawl",desc:"千亿级网页开源爬取数据",url:"https://commoncrawl.org/"},
      {name:"The Pile",desc:"800GB 多样化英文文本，训练 GPT 的好伙伴",url:"https://pile.eleuther.ai/"},
      {name:"LAION-5B",desc:"50 亿图文对，Stable Diffusion 的燃料",url:"https://laion.ai/"},
      {name:"OpenWebText2",desc:"Reddit 高质量网页文本镜像",url:"https://openwebtext2.readthedocs.io/"},
      {name:"COCO",desc:"33 万张图、200 万标签，目标检测/分割必备",url:"https://cocodataset.org/"},
      {name:"WMT",desc:"机器翻译权威比赛数据集合集",url:"http://www.statmt.org/wmt21/"},
      {name:"LibriSpeech",desc:"1000 小时英文有声书语音数据",url:"http://www.openslr.org/12/"}
    ];

    const list=document.getElementById('list');
    datasets.forEach(d=>{
      const card=document.createElement('div');
      card.className='card';
      card.innerHTML=`
        <h3>${d.name}</h3>
        <p>${d.desc}</p>
        <a href="${d.url}" target="_blank" onclick="copy('${d.url}')">复制链接</a>
      `;
      list.appendChild(card);
    });

    function copy(u){
      navigator.clipboard.writeText(u);
    }
  </script>
</body>
</html>